#include <bits/stdc++.h>

using namespace std;
using ll = int64_t;

struct Itv{
    ll start,end;
    bool operator<(const Itv&o)const{
        return start<o.start;
    }
};

const ll maxn=2e5+5,inf=(ll(1)<<61);
ll a[maxn],w[maxn],n,q,c[maxn],ms[maxn];

int main(){
    ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
    
    cin>>n>>q;
    for(ll i{1};i<=n;i++)cin>>a[i];
    for(ll i{1};i<=q;i++)cin>>w[i];

    for(ll i{1};i<=q;i++){
        c[i]=c[i-1]+w[i];
    }
    set<pair<ll,ll>> sn;
    sn.emplace(-inf,inf);
    for(ll i{1};i<=n;i++){
        ll sh{w[i]};
        if(sh==0){
            continue;
        }
        for(ll j{1};j<=n;j++){
            ll op{a[j]+c[i-1]};
            ll np{a[j]+c[i]};
            ll l=min(op,np);
            ll r=max(op,np);
            auto it {sn.lower_bound({l,-inf})};
            if(it!=sn.begin()){
                --it;
            }
            vector<pair<ll,ll>> rm;
            vector<pair<ll,ll>> add;
            ll tot{};
            auto itr {it};
            while(itr!=sn.end()){
                if(itr->first>r)break;
                if(itr->second<l){
                    ++itr;
                    continue;
                }
                ll vl {max(l,itr->first)};
                ll vr {min(r,itr->second)};
                if(vl<vr){
                    tot+=vr-vl;
                }
                rm.emplace_back(*itr);
                if(itr->first<vl){
                    add.emplace_back(make_pair(itr->first,vl));
                }
                if(itr->second>vr){
                    add.emplace_back(make_pair(vr,itr->second));

                }
                ++itr;
            }
            for(auto &[s,e]:rm){
                sn.erase({s,e});
            }
            for(auto &[s,e]:add){
                sn.emplace(s,e);
            }
            ms[j]+=tot;
        }
    }
    for(ll i{1};i<=n;i++){
        cout<<ms[i]<<'\n';
    }
}   